/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package model;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;
import javax.persistence.Table;
import javax.persistence.Entity;

/**
 *
 * @author woutermkievit
 */
@Entity
@Table(name = "Course")
public class Course implements Serializable {

    
    @Id
    @Column(name = "cName")
    private String cName;
    @Column(name = "cDescription")
    private String cDescription;
    @ManyToOne(fetch = FetchType.LAZY)
    private Category category; 
    @ManyToOne(fetch = FetchType.EAGER)
    private Teacher teacher;

    public Course() {
    }
    
    public Course(String cName) {
        this.cName = cName;
    }

    public Course(String cName, String cDescription, Category category, Teacher teacher) {
        this.cName = cName;
        this.cDescription = cDescription;
        this.category = category;
        this.teacher = teacher;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    

    public String getcDescription() {
        return cDescription;
    }

    public void setcDescription(String cDescription) {
        this.cDescription = cDescription;
    }

    public String getcName() {
        return cName;
    }

    public void setcName(String cName) {
        this.cName = cName;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }
    
    
}
